package com.itheima.sh.clients;

import com.itheima.sh.clients.fallback.UserFeignApiFallBack;
import com.itheima.sh.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//feigin客户端，封装了ribbon,拉取服务提供端的方法，参数对外提供接口，
@FeignClient(value = "user-service",fallback = UserFeignApiFallBack.class)
public interface UserFeignApi {
    @GetMapping("user/{username}")
    public User finduser(@PathVariable("username") String username);
}
